package com.group.project.hrms.utils;


/**
 * 该类是通用进度条的计算工具
 */
public class ProgressUtil {
    public static int percent = 1;
    public int doComputingProgressPercent(int finishedCount, int totalCount){
        if(finishedCount == 0){
            return 0;
        }else{
            try{
                return (int)((float)finishedCount / totalCount * 100);
            }catch (Exception e){
                e.printStackTrace();
                return 0;
            }
        }
    }
}
